#define DEBUG
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>

using namespace std;

const int maxn=50000;

class Point {
	public:
		int x, y;

		static bool cmp(Point a, Point b) {
			return a.x<b.x;
		}
};

class Ele {
	public:
		double k;
		int v;

		static bool cmp(Ele a, Ele b) {
			return a.k<b.k;
		}
};

void discret(Point *a, int n) {
	static Ele eles[maxn+1];
	for (int i=1; i<=n; i++) {
		eles[i].k = a[i].y;
		eles[i].v = i;
	}
	sort(eles+1, eles+n+1, Ele::cmp);

	eles[0].k = eles[1].k;
	for (int i=1, p=1; i<=n; i++) {
		p += eles[i].k!=eles[i-1].k;
		a[eles[i].v].y = p;
	}
}

void map(Point *a, Point *b, int n, long double angle) {
	for (int i=1; i<=n; i++) {
		b[i].x = a[i].x*sin(angle)-a[i].y*cos(angle);
		b[i].y = a[i].y;
	}
}

int lowbit(int k) {
	return k&(-k);
}

void add(int *a, int k, int v, int n) {
	for (; k<=n; k+=lowbit(k)) {
		a[k] += v;
	}
}

int sum(int *a, int n) {
	int ret=0;
	for (; n>0; n-=lowbit(n)) {
		ret += a[n];
	}
	return ret;
}

int getLowerLine(Point *a, int n, long double angle) {
	static Point p[maxn+1];
	map(a, p, n, angle);
	sort(p+1, p+n+1, Point::cmp);
	discret(p, n);

	static int ta[maxn+1];
	memset(ta, 0, sizeof(ta));
	int ret=0;
	for (int i=1, j; i<=n; ) {
		for (j = i; j<=n && p[j].x==p[i].x; j++) {
			ret += sum(ta, n)-sum(ta, p[j].y);
		}
		for (; i<j; i++) {
			add(ta, p[i].y, 1, n);
		}
	}
	return ret*2;
}

long double solve(Point points[], int n, int x) {
	const long double eps=1e-10, pi=atan(1)*4;
	long double ans=0;
	for (long double l=0, r=2*pi, mid; l<=r; ) {
		mid=(l+r)/2;
		int result = mid==2*pi ? n : getLowerLine(points, n, mid);
		if (result>=x) {
			l = mid+eps;
		} else {
			ans = mid-eps;
			r = mid-eps;
		}
	}
	return ans;
}

int main() {
	freopen("line.in", "r", stdin);
	freopen("line.out", "w", stdout);

	static Point points[maxn+1];
	int n, m;
	scanf("%d", &n);
	m = n*(n-1)/2;
	for (int i=1; i<=n; i++) {
		scanf("%d %d", &points[i].x, &points[i].y);
	}

	printf("%.10LF", m%2 ? solve(points, n, (m+1)/2) : (solve(points, n, m/2)+solve(points, n, m/2+1))/2);

	fclose(stdin);
	fclose(stdout);
	return 0;
}
